Modify Fields - Modify field name, value, type, width or decimal precision

With this function you can modify several fields of multiple tables or themes, i.e. change field name, type, width and number of decimal places:
- You must activate the tables or themes, which you want to modify, before calling the function (click on them with the mouse pointer - keep the
Shift key
pressed to select multiple tables or themes).
Common Fields: Shows the fields that occur several times (fields with the same name in the same or in different tables). Click on a field to select or drop the corresponding fields in Unique Fields.
Unique Fields: Shows either the unique fields (option is active) or all fields (option is inactive). Select the fields you want to modify. See detailed information at Hints to select fields.
Name: To rename the selected fields you can enter any valid Avenue function for strings (see ArcView online help), that uses an "N" as a variable for the original name. Further you can use the variable "A" for the alias of the field name in the spreadsheet, "T" for the base name of the table and "C" for a consecutive count (starting at 1).
- For a single field a new name can be entered in quotation marks (e.g.
"Hectares").
To rename multiple fields you must enter a valid name function (see Rename Fields).
Keep Original Fields: Activate this option if you want to keep the original fields (i.e. new fields will be created).
Deactivate this option to delete the original fields (i.e. the fields will be modified). This option is only available if the field name will be changed, i.e. a function unlike "N" is entered (you can't create new fields with the same name). If the original fields are replaced though, the field names always should be kept, as legends etc. that base on old fields, wont work any more. Further you have to bear in mind, that by keeping the originals the number of fields will double, but only 255 field per table are possible.
Field Type: The type of the fields can be changed as follows:
: All fields will be converted to numbers (inconvertible values stay empty).
String: All fields will be converted into text (this conversion can always be done without errors and is also 100% reversible).
Boolean: All fields will be converted into True or False (this works for the numeric values 0 for No and unequal 0 for Yes or the text values "T", "True", "Y", "Yes", "Ja", "J", "Wahr", "Oui", "Si", "F", "False", "N", "No", "Falsch", "Nein" - all other values get lost during conversion).
Date: All fields will be converted into date values (in a text string the order can be Year.Month.Day or Day.Month.Year, separated by dot ".", hyphen "-" or slash "/", the year can be two- or four-digit, month or day one- or two-digit, a number must always have the format YYYYMMDD).
Warning
: Conversion errors can occur if e.g. a text is not convertible into a number or a date. These values would get lost if the original field will be removed. Therefore the original fields should always be kept - see option above.
Field Width: The field width of numeric or text fields can be changed (the field width of boolean fields in ArcView is always 1 and of date fields always 8 characters). The field width will be set to a fixed value by default. Activate the option In-/decrease if you want to increase (positive value) or decrease (negative value) the width of the fields.
Warning
: Decreasing the field width may cause a loss of data. For security reasons you should either keep the original fields or use the function Optimize Fields which calculates the optimum field width.
Decimal Places: Only if Numeric is chosen as field type, you can change the decimal precision of the field values. The number of decimal places will be set to a fixed value by default. Activate the option In-/decrease if you want to increase (positive value) or decrease (negative value) the decimal precision.
Warning
: By changing the decimal precision the field width will be adapted automatically, i.e. if you add 2 decimal places the field width will be increased by 2 places too (or decreased respectively). This will not work though, if the field width is set to a fixed value. In this case adding decimal places without increasing the field width may cause the drop of pre-decimal places and therefore a loss of data (if the number is too large for the field it will get lost and the field stays empty).
- Click on
to apply the changes to the selected fields. The new fields will be created at the end of the table and all values will be copied or converted from the original fields. This may take some minutes, according to the number of fields and records. Click on
Apply to apply the changes and reopen the dialog for further modifications.
Node
: If the original fields are replaced, the new fields are put on the same position in the spreadsheet automatically. To restore the original field order in the table file, you should use the function Reorder Fields afterwards.
- The status bar finally shows the number of modified fields. If errors occurred while converting the field type, the number of lost field values will be displayed separately for numeric, boolean and date values.
© 2003 WLM Klosterhuber & Partner OEG